package com.ia.bikerecife.maps;

import java.io.Serializable;

import com.google.android.gms.maps.model.LatLng;

public class Coordenate implements Serializable {

    private static final long serialVersionUID = 1L;

    private double            mLatitude;
    private double            mLongitude;

    private LatLng            mLatLng;

    public Coordenate() {
    }

    public Coordenate(double latitude, double longitude) {
        mLatitude = latitude;
        mLongitude = longitude;
    }

    public double getLatitude() {
        return mLatitude;
    }

    public void setLatitude(double latitude) {
        this.mLatitude = latitude;
        mLatLng = null;
    }

    public double getLongitude() {
        return mLongitude;
    }

    public void setLongitude(double longitude) {
        mLongitude = longitude;
        mLatLng = null;
    }

    public LatLng getGoogleFormat() {
        if (mLatLng == null) {
            mLatLng = new LatLng(mLatitude, mLongitude);
        }
        return mLatLng;
    }

}
